#ifndef _WONTEC_WTAIS42_H
#define _WONTEC_WTAIS42_H
#include "wontec_485.h"

typedef enum
{
    GET_PROGRAM_VERSION_AIS,
    UNLOCK_ELE_MACHINE,
    SET_SPEED_ADJUST_TIME,
    SET_CURRENT_SUBDIV,
    SET_PARAM_MAX_ORIG_DISTANCE,
    SET_RESET_CURRENT,
    ELE_AB_POSITION_ACTION,
    QUERY_ARRIVED,
    READ_ELE_AXIS,
    SET_MAX_ERROR_PER,
    SET_CUR_POS_SOFT_ZERO,
    RESET_ELE_MACHINE,
    QUERY_RETBACK_STATUS_AIS,
    SET_LIQUID_POS_PROBE_MAX_DISTANCE,
    ELE_REL_POS_ACTION,
    ELE_MOMENT_MODE,
    ELE_MOMENT_ABPOS_ACTION,
    READ_MOVE_PULSES_LAST_TIME,
    ELE_ABPOS_LIQUIDPOS_ACTION,
    ELE_ROTATE_MAN_STOP,
    READ_SENSOR_VALUE,
    READ_MOVE_SPEED,
    READ_SUBDIV_VALUE,
    READ_CONFIG_PARAM_ORIG_DIS,
    READ_LIQUID_POS_PROBE_MAX_DIS,
    SET_POS_ORIGIN,
    READ_POS_ORIGIN,
    READ_ELE_ADDR,
    SET_ELE_ADDR,
    SAVE_ALL_CONFIG_PARAM_AIS,
    READ_RETBACK_SPEED_CONFIRM_SECOND,
    READ_ALL_PARAM_DATA_AIS,
    SET_ALL_PARAM_DATA_AIS,
    SET_RETBACK_THRESHOLD_HARD_ZERO,
    SET_MAX_VALUE_MOMENT_MODE,
    READ_MAX_VALUE_MOMENT_MODE,
    SET_LOW_SPEED_LIQUID_POS_PROBE,
    READ_LOW_SPEED_LIQUID_POS_PROBE,
    MAX_CMD_NUM_AIS,
}en_cmd_WTAIS42;

extern char wtais_cmds[MAX_CMD_NUM_AIS];

#define ADDR_AIR_PUMP_Z 0x0001
#define ADDR_JAW_Z      0x0002
#define ADDR_Y          0x0003
#define ADDR_X          0x0004
#define ADDR_JAW        0x0005

typedef enum
{
    i_addr_air_pump_z,
    i_addr_jaw_z,
    i_addr_y,
    i_addr_x,
    i_addr_jaw,
    MAX_DP1_ELE_NUM
}en_ele_index;

unsigned short dp1_ele_addr_arr[MAX_DP1_ELE_NUM] = 
{
    0x0001,
    0x0002,
    0x0003,
    0x0004,
    0x0005
};

void set_wtais_data(unsigned short addr,wontec_cmd *pstWtCmd,unsigned char * buffOut, unsigned char* lenOut);
void set_wtej28_data(unsigned short addr,wontec_cmd *pstWtCmd,unsigned char * buffOut, unsigned char* lenOut);

int checkProcWtej28OnPoint(void * dataStd,void * dataRecv);

#endif